<template>
  <ky-table :getData="getBatchList" ref="table" :showSelect="true" :search_data="search_data">
    <template v-slot:table-action>
      <el-button class="kylin-item-button" v-show="type=='source'"
      :disabled="$refs.table && $refs.table.selectRow.ids.length == 0">
        {{ $t("configure.add_select_content") }}
      </el-button>
      <el-button class="kylin-item-button" v-show="type=='target'"
      :disabled="$refs.table && $refs.table.selectRow.ids.length == 0">
        {{ $t("configure.remove_select_content") }}
      </el-button>
      <el-button class="kylin-item-button" v-show="type=='target'">
        {{ $t("configure.migrate_comfirm") }}
      </el-button>
    </template>
    <template v-slot:table>
        <el-table-column :label="$t('configure.configure_name')" prop="name" />
        <el-table-column :label="$t('configure.kylin_host_value')" prop="kylin_host_value" />
        <el-table-column :label="$t('configure.suse_host_value')" prop="suse_host_value" />
        <el-table-column :label="$t('configure.file_path')" prop="file_path" />
    </template>
  </ky-table>
</template>

<script>
import kyTable from "@/components/KyTable";
import { getBatchList } from "@/api/batch";
export default {
  components: {
    kyTable,
  },
  data(){
      return {
          search_data: {
              name: {
                  name: "configure.configure_name",
                  type: "text"
              },
              kylin_host_value: {
                  name: "configure.kylin_host_value",
                  type: "text"
              },
              suse_host_value: {
                  name: "configure.suse_host_value",
                  type: "text",
              },
              file_path: {
                  name: "configure.file_path",
                  type: "text"
              }
          }
      }
  },
  props: {
    type: String,
  },
  methods: {
    getBatchList,
  }
};
</script>

<style>
</style>